import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/Home/Home'
import Type from '@/views/Type/Type'
import Cart from '@/views/Cart/Cart'
import User from '@/views/User/User'
import MdseList from '@/views/Home/MdseList'
import Search from '@/views/Home/Search'
import Order from '@/views/Cart/Order'
import Address from '@/views/Address/Address'
import EditAddress from '@/views/Address/EditAddress'
import PayResult from '@/views/Cart/PayResult'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component: Home,
      meta: { in: 0 }
    },
    {
      path: '/MdseList',
      component: MdseList,
      meta: { hideNav: true }
    },
    {
      path: '/Search',
      component: Search,
      meta: { hideNav: true }
    },
    {
      path: "/Type",
      component: Type,
      meta: { in: 1 }
    },
    {
      path: "/Cart",
      component: Cart,
      meta: { in: 2 }
    },
    {
      path: "/Order",
      component: Order,
      meta: { hideNav: true }
    },
    {
      path: "/PayResult",
      component: PayResult,
      meta: { hideNav: true }
    },
    {
      path: "/Address",
      component: Address,
      meta: { hideNav: true }
    },
    {
      path: "/EditAddress",
      component: EditAddress,
      meta: { hideNav: true }
    },
    {
      path: "/User",
      component: User,
      meta: { in: 3 }
    }
  ]
})
